﻿CREATE PROCEDURE [ServiceEngine].[GetMessageHeadersForOperationVersion]
@OperationVersionID UNIQUEIDENTIFIER, @IsRequestHeader BIT
AS
BEGIN
	SET NOCOUNT ON;

	SELECT 
		MH.[MessageHeaderID],
		MH.[Name],
		MH.[IsRequired],
		MH.[ProtectionLevel],
		MH.SchemaObjectID
	FROM
		ServiceEngine.MessageHeaders MH 
	WHERE
		MH.OperationVersionID = @OperationVersionID AND
		MH.IsRequestHeader = @IsRequestHeader
	Order By 
		MH.[Ordinal]
END
